Hệ thống quản lý trường đại học bằng PHP
1 <?php
2 require_once('../includes/config.php');
3 if(!$user->is_logged_in()){
4 header('Location: ../login.php');
5 }
6 ?>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <meta name="viewport" content="width=device-width, initial-scale=1">
11 <title>Marks Edit</title>
12
13 <link href="css/bootstrap.min.css" rel="stylesheet">
14 <link href="css/datepicker3.css" rel="stylesheet">
15 <link href="css/bootstrap-table.css" rel="stylesheet">
16 <link href="css/styles.css" rel="stylesheet">
17
18 <!--Icons-->
19 <script src="js/lumino.glyphs.js"></script>
20
21 <!--[if lt IE 9]>
22 <script src="js/html5shiv.js"></script>
23 <script src="js/respond.min.js"></script>
24 <![endif]-->
25
26 </head>
27
28 <body>
29 <?php
30 require_once('includes/common.php');
31 ?>
32
33 <div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
34 <div class="row">
35 <ol class="breadcrumb">
36 </ol>
37 </div><!--/.row-->
38 <div class="row">
39 <div class="col-lg-12">
40 <div class="panel panel-default">
41 <div class="panel-heading">Students List</div>
42 <div class="panel-body">
43 <table data-toggle="table" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-search="true" data-select-item-name="toolbar1" data-pagination="true" data-sort-name="name" data-sort-order="desc">
44 <thead>
45 <tr>
46 <th ddata-sortable="true">Carte Etudiant</th>
47 <th data-sortable="true">Prenom</th>
48 <th data-sortable="true">Nom</th>
49 <th data-sortable="true">Fillière</th>
50 <th data-sortable="true">Matière</th>
51 <th data-sortable="true">Type</th>
52 <th data-sortable="true">Note</th>
53 </tr>
54 </thead>
55 <tbody>
56 <?php
57 try {
58 $stmt = $db->query('SELECT *
59 FROM etudiant
60 INNER JOIN note ON etudiant.carteEtudiant = note.carteEtudiant
61 INNER JOIN niveau ON niveau.lvlID = note.lvlID
62 INNER JOIN matiereparfiliere ON note.lvlID = matiereparfiliere.lvlID
63 INNER JOIN filierefullinfo ON etudiant.filiereID = filierefullinfo.filiereID
64 INNER JOIN matiere ON matiere.matiereID = note.matiereID;');
65 while($row = $stmt->fetch()){
66 echo "<tr><td>".$row['carteEtudiant']."</td><td>".$row['prenom']."</td><td>".$row['nom']."</td><td>".$row['full_name']."</td><td>".$row['nom_matiere']."</td><td>".$row['nature']."</td><td>".$row['valeur']."</td></tr>";
67 }
68 }catch(PDOException $e) {
69 echo $e->getMessage();
70 }
71 ?>
72 </tbody>
73 </table>
74 </div>
75 </div>
76
77
78 <div class="panel panel-default">
79 <div class="panel-heading">Add a MARK</div>
80 <div class="panel-body">
81 <form role="form" action="addmark.php" method="POST">
82 <div class="form-group">
83 <label>Numero carte etudiant</label>
84 <input class="form-control" name="carteEtudiant" type="number">
85 </div>
86
87 <div class="form-group">
88 <label>Type</label>
89 <select class="form-control" name="nature">
90 <option value="tp">tp</option>
91 <option value="ds1">ds1</option>
92 <option value="ds2">ds2</option>
93 <option value="examen1">examen1</option>
94 <option value="examen2">examen2</option>
95 </select>
96 </div>
97 <div class="form-group">
98 <label>Matière</label>
99 <select class="form-control" name="matiereID">
100 <?php
101 $stmt = $db->query('SELECT * FROM `matiere` ;');
102 while($row = $stmt->fetch()){
103 echo '<option value="'.$row['matiereID'].'">'.$row['nom_matiere'].'</option>';
104 }
105 ?>
106 </select>
107 </div>
108
109 <div class="form-group">
110 <label>Note</label>
111 <input class="form-control" name="note" type="number">
112 </div>
113
114 <button type="submit" name="submit" class="btn btn-primary">Submit Button</button>
115 <button type="reset" class="btn btn-default">Reset Button</button>
116 </div>
117 </form>
118 </div>
119 </div>
120 </div><!--/.row-->
121 </div><!--/.main-->
122
123 <script src="js/jquery-1.11.1.min.js"></script>
124 <script src="js/bootstrap.min.js"></script>
125 <script src="js/chart.min.js"></script>
126 <script src="js/chart-data.js"></script>
127 <script src="js/easypiechart.js"></script>
128 <script src="js/easypiechart-data.js"></script>
129 <script src="js/bootstrap-datepicker.js"></script>
130 <script src="js/bootstrap-table.js"></script>
131 <script>
132 !function ($) {
133 $(document).on("click","ul.nav li.parent > a > span.icon", function(){
134 $(this).find('em:first').toggleClass("glyphicon-minus");
135 });
136 $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
137 }(window.jQuery);
138
139 $(window).on('resize', function () {
140 if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
141 })
142 $(window).on('resize', function () {
143 if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
144 })
145 </script>
146 </body>
147
148 </html>